home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue63 / Debug / Demos / BDDmpAll.dpr < prev    next >
Encoding:
Text File  |  2000-10-01  |  971 b   |  39 lines

  1. program BDDmpAll;
  2. {$APPTYPE CONSOLE}
  3. uses
  4.   BorDebug, HVBorDebug, BorDebugScanners, BorDebugDumpScanner;
  5.  
  6. type
  7.   TDumpToStdOut = class(TObject)
  8.   public
  9.     procedure OnScannerDump(Sender: TObject; const Msg: string);
  10.   end;
  11.  
  12. procedure TDumpToStdOut.OnScannerDump(Sender: TObject; const Msg: string);
  13. begin
  14.   Write(Msg);
  15. end;
  16.  
  17. var
  18.   Debug: TBorDebug;
  19.   DumpScanner: TDumpBorDebugScanner;
  20.   DumpToStdOut: TDumpToStdOut;
  21. begin
  22.   Debug := nil;
  23.   DumpToStdOut := nil;
  24.   DumpScanner := nil;
  25.   try
  26.     Debug := TBorDebug.Create(ParamStr(1));
  27.     DumpToStdOut := TDumpToStdOut.Create;
  28.     DumpScanner := TDumpBorDebugScanner.Create(Debug);
  29.     DumpScanner.OnDump := DumpToStdOut.OnScannerDump;
  30.  
  31.     DumpScanner.Scan([soModule, soAlignSym, soSrcModule, soGlobalSym, soGlobalPub,
  32.       soGlobalTypes, soNames, soBrowse, soSrcModuleRanges, soSrcModuleFiles]);
  33.   finally
  34.     DumpScanner.Free;
  35.     DumpToStdOut.Free;
  36.     Debug.Free;
  37.   end;
  38. end.
  39.